<div class="panel">
    <div class="panel-heading">
        <i class="icon-envelope"></i>
        <if condition="$type eq 1">
    			{$data.title}        
    		<else/>
    			与 {$sendername} 的会话
        </if>
        <span class="pull-right">                               
            <button type="button" id="pzReturn-btn" class="btn btn-default btn-xs" onclick="javascript:window.history.back();return false;"><i class="icon-reply"></i>返回</button>
        </span>            
    </div>   
    <div class="panel-body profile-activity">
        <if condition="$type eq 0">
             <!--  <volist name="data" id="list">
                   <div class="direct-chat-msg <if condition="$list['sender'] eq $_SESSION['admin_id']">right</if>">
                       <div class="direct-chat-info clearfix"><span class="direct-chat-timestamp pull-right"></span></div>
                        <span class="direct-chat-img"></span>
                       <div class="direct-chat-text"></div>
                   </div>
               </volist> -->
            <volist name="data" id="list">
                <div class="activity blue <if condition="$list['sender'] eq $_SESSION['admin_id']">alt</if>">
                    <span><i class="glyphicon glyphicon-user"></i>{$list.name}</span>
                    <div class="activity-desk">
                        <div class="panel">
                            <div class="panel-body" style="min-width: 500px;">
                                <div class="arrow <if condition="$list['sender'] eq $_SESSION['admin_id']">alt</if>"></div>
                                <i class=" icon-time"></i>
                                <h4>{$list.send_time|date="Y-m-d H:i",###}</h4>
                                <p>{$list.message}</p>
                            </div>
                        </div>
                    </div>
                </div>   
            </volist>
        <else/>
            <div class="activity green">
                <span><i class="icon-pushpin"></i>系统提示</span>
                <div class="activity-desk">
                    <div class="panel">
                        <div class="panel-body" style="min-width: 500px;">
                            <div class="arrow"></div>
                            <i class=" icon-time"></i>
                            <h4>{$data.send_time|date="H:i",###}</h4>
                            <p>{$data.message}</p>
                        </div>
                    </div>
                </div>
            </div>   
        </if>
    </div>
  <script type="text/javascript" src="__PUBLIC__/js/layer/layer.js"></script>   
<script>
//回复站内信  
function recle(){
  	var jid = {$sender};
  	var replyid = {$replyid};
  	var message = $('textarea[name="content"]').val();
  	var title = '聊天对话';
  	if(jid == '' || jid==undefined || replyid==0){
  		layer.msg('ID有误,请返回重试', {icon: 2,time: 2000}); 
          return;
  	}
  	if(message==''){
  		layer.msg('内容不能为空', {icon: 2,time: 2000});
          return;
  	}
  	$.ajax({
				type : 'post',
				url : '__URL__/doSendMessage',
				data : {user:jid,title:title,text:message,replyid:replyid},
				dataType : 'json',
				success : function(data){
					if(!data.errNo){
						 $('textarea[name="content"]').val('');
						 ajax_get_table();
						 layer.msg(data.msg,{time:2000});
	     	        }else{
	     	        	 layer.msg(data.msg,{time:2000});
	     	        }
				}
		})
  }  

</script> 